function getSearchParam(searchStr?: string): {[props: string]: string} {
  const searchParams = new URLSearchParams(searchStr || window.location.search)
  const params: {[props: string]: string} = {}
  for (const key of searchParams.keys()) {
    params[key] = searchParams.get(key) || ""
  }
  return params
}

const IHelper = {
  getSearchParam
}

export default IHelper
